package net.aiion.weave.impl.painters.stream.identicons;

import net.aiion.weave.spi.painters.stream.identicons.Identicon;

public final class IdenticonFactory
{
    private IdenticonFactory() {
    }

    public Identicon createIdenticon(final String identiconData) {
        return new IdenticonImpl(identiconData);
    }

    public Identicon createIdenticon(final byte[] identiconData) {
        return new IdenticonImpl(identiconData);
    }

    public static IdenticonFactory getInstance() {
        return IdenticonFactoryHolder.INSTANCE;
    }

    private static final class IdenticonFactoryHolder
    {
        private static final IdenticonFactory INSTANCE = new IdenticonFactory();

        private IdenticonFactoryHolder() {
        }
    }
}
